package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.recallplayer.config.RecallPlayerDrawConfig;
import com.yanqu.road.entity.activity.recallplayer.config.RecallPlayerTypeConfig;
import com.yanqu.road.entity.activity.recallplayer.data.RecallPlayerBindingTaskData;
import com.yanqu.road.entity.activity.recallplayer.data.UserRecallOtherData;
import com.yanqu.road.entity.activity.recallplayer.data.UserRecallSelfData;
import com.yanqu.road.entity.activity.recallplayer.data.UserRecallBeBindData;
import com.yanqu.road.entity.player.UserBaseInfo;
import com.yanqu.road.entity.player.UserInfo;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class RecallPlayerBusiness {
    //-----config
    public static Map<Integer, RecallPlayerDrawConfig> getRecallPlayerDrawConfigMap(int activityId) {
        return DaoHelper.getRecallPlayerConfigDaoImpl().getRecallPlayerDrawConfigMap(activityId);
    }

    public static List<RecallPlayerTypeConfig> getRecallPlayerTypeConfigList(int activityId) {
        return DaoHelper.getRecallPlayerConfigDaoImpl().getRecallPlayerTypeConfigList(activityId);
    }

    //------data


    public static UserRecallBeBindData getUserRecallBeBindData(long userId) {
        return DaoHelper.getUserRecallBeBindDataDaoImpl().getUserRecallBeBindData(userId);
    }

    public static boolean addUserRecallBeBindData(UserRecallBeBindData data) {
        return DaoHelper.getUserRecallBeBindDataDaoImpl().add(data);
    }

    public static boolean updateUserRecallBeBindData(UserRecallBeBindData data) {
        return DaoHelper.getUserRecallBeBindDataDaoImpl().update(data);
    }

    public static boolean addRecallPlayerBindingTaskData(RecallPlayerBindingTaskData data) {
        return DaoHelper.getBindingTaskDataDaoImpl().add(data);
    }

    public static boolean updateRecallPlayerBindingTaskData(RecallPlayerBindingTaskData data) {
        return DaoHelper.getBindingTaskDataDaoImpl().update(data);
    }

    public static Map<Long, List<RecallPlayerBindingTaskData>> getBindingTaskData(long userId) {
        return DaoHelper.getBindingTaskDataDaoImpl().getBindingTaskData(userId);
    }

    public static boolean addUserRecallSelfData(UserRecallSelfData userRecallSelfData) {
        return DaoHelper.getUserRecallSelfDataDaoImpl().add(userRecallSelfData);
    }

    public static boolean updateUserRecallSelfData(UserRecallSelfData userRecallSelfData) {
        return DaoHelper.getUserRecallSelfDataDaoImpl().update(userRecallSelfData);
    }

    public static UserRecallSelfData getUserRecallSelfData(long userId) {
        return DaoHelper.getUserRecallSelfDataDaoImpl().getUserRecallSelfData(userId);
    }

    public static Map<Long, String> getUserRecallCodeData() {
        return DaoHelper.getUserRecallSelfDataDaoImpl().getUserRecallCodeMap();

    }

    public static Map<Long, UserBaseInfo> getBindUserBaseInfoMap(long userId) {
        return DaoHelper.getUserRecallOtherDataDaoImpl().loadUserBaseInfo(userId);
    }

    public static boolean updateBindUserInfo(UserBaseInfo userBaseInfo, long userId, long recallUserId) {
        return DaoHelper.getUserRecallOtherDataDaoImpl().updateUserInfoData(userBaseInfo, userId, recallUserId);
    }

    public static Map<Long, Map<Integer, List<UserRecallOtherData>>> getAllUserRecallOtherInfo() {
        return DaoHelper.getUserRecallOtherDataDaoImpl().getAllUserRecallOtherData();
    }

    public static boolean addRecallOtherData(UserRecallOtherData data) {
        return DaoHelper.getUserRecallOtherDataDaoImpl().add(data);
    }

    public static boolean updateRecallOtherData(UserRecallOtherData data) {
        return DaoHelper.getUserRecallOtherDataDaoImpl().update(data);
    }

}
